using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._GeocodingTools
{
    /// <summary>
    /// <para>Create Feature Locator</para>
    /// <para>Creates a locator using reference data that contains a unique name or value for every feature stored in a single field. A locator created with this tool has broad applications. It can be used to search for names or unique attributes of your features, such as water meters, short place names, cell towers, or alphanumeric strings used to identify locations (for example, N1N115).</para>
    /// <para>使用包含存储在单个字段中的每个要素的唯一名称或值的参考数据创建定位器。使用此工具创建的定位器具有广泛的应用。它可用于搜索要素的名称或唯一属性，例如水表、短地名、手机信号塔或用于标识位置的字母数字字符串（例如，N1N115）。</para>
    /// </summary>    
    [DisplayName("Create Feature Locator")]
    public class CreateFeatureLocator : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public CreateFeatureLocator()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_features">
        /// <para>Input Features</para>
        /// <para><xdoc>
        ///   <para>The reference data feature class or feature layer that will be used to create the locator.</para>
        ///   <para>Feature classes represented as services are supported data types for use as reference data.</para>
        ///   <para>When a definition query is defined for the reference data or there are selected features, only the queried and selected features are included when the locator is created.</para>
        ///   <para>When creating a locator with reference data that contains millions of features, you must have at least three to four times the size of the data in free disk space on the drive containing your temp directory, as files used to build the locator are written to this location before the locator is copied to the output location. If you do not have enough disk space, the tool will fail when it runs out of space. Also, when creating large locators, your machine must have enough RAM to handle large memory-intensive processes.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>将用于创建定位器的参考数据要素类或要素图层。</para>
        ///   <para>表示为服务的要素类是受支持用作参考数据的数据类型。</para>
        ///   <para>如果为参考数据定义了定义查询或存在所选要素，则在创建定位器时仅包括查询要素和所选要素。</para>
        ///   <para>使用包含数百万个要素的参考数据创建定位器时，包含临时目录的驱动器上的可用磁盘空间中的数据大小必须至少是其大小的三到四倍，因为在将定位器复制到输出位置之前，用于构建定位器的文件将写入此位置。如果磁盘空间不足，则该工具将在空间不足时失败。此外，在创建大型定位器时，计算机必须具有足够的 RAM 来处理大型内存密集型进程。</para>
        /// </xdoc></para>
        /// </param>
        /// <param name="_search_fields">
        /// <para>Search Fields</para>
        /// <para>Maps the reference data field to the field used for search in the Input Features parameter. Fields with an asterisk (*) next to their names are required. The selected field will be indexed and used for search.</para>
        /// <para>将参考数据字段映射到输入要素参数中用于搜索的字段。名称旁边带有星号 （*） 的字段为必填项。所选字段将被编入索引并用于搜索。</para>
        /// </param>
        /// <param name="_output_locator">
        /// <para>Output Locator</para>
        /// <para>The output locator file to be created in a file folder. Once the locator is created, additional properties and options can be modified in the locator's settings.</para>
        /// <para>要在文件夹中创建的输出定位器文件。创建定位器后，可以在定位器的设置中修改其他属性和选项。</para>
        /// </param>
        public CreateFeatureLocator(object _in_features, object _search_fields, object _output_locator)
        {
            this._in_features = _in_features;
            this._search_fields = _search_fields;
            this._output_locator = _output_locator;
        }
        public override string ToolboxName => "Geocoding Tools";

        public override string ToolName => "Create Feature Locator";

        public override string CallName => "geocoding.CreateFeatureLocator";

        public override List<string> AcceptEnvironments => ["workspace"];

        public override object[] ParameterInfo => [_in_features, _search_fields, _output_locator, _locator_fields];

        /// <summary>
        /// <para>Input Features</para>
        /// <para><xdoc>
        ///   <para>The reference data feature class or feature layer that will be used to create the locator.</para>
        ///   <para>Feature classes represented as services are supported data types for use as reference data.</para>
        ///   <para>When a definition query is defined for the reference data or there are selected features, only the queried and selected features are included when the locator is created.</para>
        ///   <para>When creating a locator with reference data that contains millions of features, you must have at least three to four times the size of the data in free disk space on the drive containing your temp directory, as files used to build the locator are written to this location before the locator is copied to the output location. If you do not have enough disk space, the tool will fail when it runs out of space. Also, when creating large locators, your machine must have enough RAM to handle large memory-intensive processes.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>将用于创建定位器的参考数据要素类或要素图层。</para>
        ///   <para>表示为服务的要素类是受支持用作参考数据的数据类型。</para>
        ///   <para>如果为参考数据定义了定义查询或存在所选要素，则在创建定位器时仅包括查询要素和所选要素。</para>
        ///   <para>使用包含数百万个要素的参考数据创建定位器时，包含临时目录的驱动器上的可用磁盘空间中的数据大小必须至少是其大小的三到四倍，因为在将定位器复制到输出位置之前，用于构建定位器的文件将写入此位置。如果磁盘空间不足，则该工具将在空间不足时失败。此外，在创建大型定位器时，计算机必须具有足够的 RAM 来处理大型内存密集型进程。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Features")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_features { get; set; }


        /// <summary>
        /// <para>Search Fields</para>
        /// <para>Maps the reference data field to the field used for search in the Input Features parameter. Fields with an asterisk (*) next to their names are required. The selected field will be indexed and used for search.</para>
        /// <para>将参考数据字段映射到输入要素参数中用于搜索的字段。名称旁边带有星号 （*） 的字段为必填项。所选字段将被编入索引并用于搜索。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Search Fields")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _search_fields { get; set; }


        /// <summary>
        /// <para>Output Locator</para>
        /// <para>The output locator file to be created in a file folder. Once the locator is created, additional properties and options can be modified in the locator's settings.</para>
        /// <para>要在文件夹中创建的输出定位器文件。创建定位器后，可以在定位器的设置中修改其他属性和选项。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Locator")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _output_locator { get; set; }


        /// <summary>
        /// <para>Additional Locator Fields</para>
        /// <para>Maps additional fields for extent and rank if they exist in the data. The Rank field is used to sort results for ambiguous queries or candidates with the same name and score. The extent fields help set the map extent for displaying geocoded results.</para>
        /// <para>映射范围和排名的其他字段（如果数据中存在这些字段）。“排名”字段用于对不明确的查询或具有相同名称和分数的候选项的结果进行排序。范围字段有助于设置用于显示地理编码结果的地图范围。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Additional Locator Fields")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _locator_fields { get; set; } = null;


        public CreateFeatureLocator SetEnv(object workspace = null)
        {
            base.SetEnv(workspace: workspace);
            return this;
        }

    }

}